import styles from './index.module.less'
import IconFont from '@/components/IconFont'

interface ListItem {
    id: number
    logo_url: string
    name: string
    introduce: number
    address: string
}

interface ListType {
    list?: ListItem[]
}

const TrainingRegistration = ({ list }: ListType) => {
    return (
        <div className={styles.training_content}>
            {list?.map((item: ListItem) => {
                return (
                    <div className={styles.content_item} key={item.id}>
                        <div className={styles.item_top}>
                            <div className={styles.item_img}>
                                <img src={item.logo_url} alt="" />
                            </div>
                            <div className={styles.item_title}>{item.name || '-'}</div>
                        </div>
                        <div className={styles.item_main}>
                            <div className={styles.item_main_title}>
                                <IconFont type="icon-xiangqing" className={styles.title_icon} />
                                <div className={styles.item_main_tips}>{item.introduce || '-'}</div>
                            </div>
                            <div className={styles.item_main_adress}>
                                <IconFont type="icon-dizhi" className={styles.title_icon} />
                                <div className={styles.item_main_tips}>{item.address || '-'}</div>
                            </div>
                        </div>
                    </div>
                )
            })}
        </div>
    )
}

export default TrainingRegistration
